Drupal.behaviors.smsvidya_editform = function(){
  var pass = $('#edit-pass');		
		var conpass1 = $('#edit-pass-pass1');
		var conpass2 = $('#edit-pass-pass2');

        if ($(conpass1).val()==="") {
			$(conpass1).val('Enter new password');
		}

		if($(conpass1).val() == "Enter new password")
		 {			 
				   if($(conpass1).length > 0)
					{	
					document.getElementById('edit-pass-pass1').type = 'text';
					}
		}
		else{
					 if($(conpass1).length > 0)
					{	
					document.getElementById('edit-pass-pass1').type = 'password';
					}  
		 }
     $(conpass1).focus(function(){
				if (conpass1.val() == 'Enter new password') {
					$(conpass1).val('');
			if($(conpass1).length > 0){	
					document.getElementById('edit-pass-pass1').type = 'password';
					}
				}
				});
				$(conpass1).blur(function(){
				if (conpass1.val() ==="") {
	  	  if($(conpass1).length > 0){
					document.getElementById('edit-pass-pass1').type = 'text';
					}
						$(conpass1).val('Enter new password');						
				}
				});
/*End of password field1*/


if ($(conpass2).val() ==="") {
			$(conpass2).val('Confirm new password');
		}

	 if($(conpass2).val() == "Confirm new password"){			 
	   if($(conpass2).length > 0){	
					document.getElementById('edit-pass-pass2').type = 'text';
					}
		}
		else{
					 if($(conpass2).length > 0)
					{	
					document.getElementById('edit-pass-pass2').type = 'password';
					}  
		 }
     $(conpass2).focus(function(){
				if (conpass2.val() == 'Confirm new password') {
					$(conpass2).val('');
					if($(conpass2).length > 0)
					{	
					document.getElementById('edit-pass-pass2').type = 'password';
					}
				}
				});
				$(conpass2).blur(function(){
				if (conpass2.val() ==="") {
					if($(conpass2).length > 0)
					{
					document.getElementById('edit-pass-pass2').type = 'text';
					}
						$(conpass2).val('Confirm new password');						
				}
				});


/*end of password field 2*/

/*Start of education field*/
var edu = $('table#group_education_values tr').length;
/*college name*/
var i = 0;
$('table#group_education_values tr').each(function(){
		var coll_name = $('#edit-group-education-'+i+'-field-college-name-value');
		var degree_name = $('#edit-group-education-'+i+'-field-course-value');

		if ($(coll_name).val() ==="") {
				   $(coll_name).val('Enter your college name');
				   }
		 
				$(coll_name).focus(function(){
				if ($(coll_name).val() == 'Enter your college name') {
					$(coll_name).val('');
				}
				});
				$(coll_name).blur(function(){
				if (coll_name.val()==="") {
						$(coll_name).val('Enter your college name');
				}
				});


				if ($(degree_name).val() ==="") {
				   $(degree_name).val('Enter the degree example: MBA(Finance)');
				   }
		 
				$(degree_name).focus(function(){
				if ($(degree_name).val() == 'Enter the degree example: MBA(Finance)') {
					$(degree_name).val('');
				}
				});
				$(degree_name).blur(function(){
				if (degree_name.val() ==="") {
						$(degree_name).val('Enter the degree example: MBA(Finance)');
				}
				});
				i++;
});
		/*end college name*/	


  /*on click of submit buton clear these fields*/
  $('#edit-submit').click(function(){
    var conpass1 = $('#edit-pass-pass1');
    var conpass2 = $('#edit-pass-pass2');

    if ($(conpass1).val() == "Enter new password") {
     $(conpass1).val('');
    } 
    if ($(conpass2).val() == "Confirm new password") {
     $(conpass2).val('');
    }
    var i =0;
    $('table#group_education_values tr').each(function(){
      var coll_name = $('#edit-group-education-'+i+'-field-college-name-value');
      var degree_name = $('#edit-group-education-'+i+'-field-course-value');

      if ($(coll_name).val() == "Enter your college name") {
        $(coll_name).val('');
      }
      if ($(degree_name).val() == "Enter the degree example: MBA(Finance)") {
        $(degree_name).val('');
      }
       i++;
   });
  });
  
}

